<script>
	export default {
		methods: {
			checkNetwork() {
				uni.onNetworkStatusChange(function(res) {
					if (res.isConnected === false || res.networkType === 'none') {
						uni.showModal({
							title: "网络提示",
							content: '网络连接异常,请检查网络!'
						})
					}
				})
			}
		},
		onLaunch: function() {
			this.checkNetwork();
		},
		onShow: function() {
			this.checkNetwork();
		},
		onHide: function() {
			console.log('App Hide')
		}
	}
</script>

<style>
	/*每个页面公共css */
</style>
